package org.example.demo21.chain.impl;

import org.example.demo21.chain.interfaces.Filter;
import org.example.demo21.entity.bo.DemoBO;

/**
 *
 * @author guocong
 * @since 2024/3/29 11:56
 */
public class SexFilter implements Filter {
    @Override
    public boolean doFilter(DemoBO demoBO) {
        Integer sex = demoBO.getSex();
        if (sex == null || !sex.equals(1)) {
            System.out.println("\033[31m 性别整差了 ！ \033[0m");
            return false;
        }
        return true;
    }
}
